const mutations = {
	login (state, data) {
		state.isLogin = true
		state.userInfo = data
		// console.log(data)
		// 缓存用户登陆状态
		uni.setStorage({
			key: 'userInfo',  
			data: data
		})
	},
	logout(state) {
		state.isLogin = false
		state.userInfo = {}
		uni.removeStorage({  
			key: 'userInfo'  
		})
	}
}

export default mutations
